import BuffUtil from '@/BuffUtil';
import ItemUtil from '@/ItemUtil';
export default class Item_斯嘉蒂之眼 {
    static id = 'nflg';
    static 名称: string = '斯嘉蒂之眼';
    static 描述: string = '移速、攻速降低，受到的治疗与生命回复降低';
    static 图标: string = 'ReplaceableTextures\\CommandButtons\\BTNIceShard.blp';
    static buffId: string = 'buff_item_bingyan';
    static buffType: AppBuffType = {
        id: 'buff_item_bingyan',
        name: Item_斯嘉蒂之眼.名称,
        ubertip: Item_斯嘉蒂之眼.描述,
        art: Item_斯嘉蒂之眼.图标,
        dur: 4,
        attribute: {
            受到治疗增强: -0.3,
            生命恢复增强: -0.3,
        },
        isDebuff: true,
    };
    static 添加技能(目标: unit) {
        UnitAddAbility(目标, Item_斯嘉蒂之眼.id);
    }
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        BuffUtil.addBuff(目标, Item_斯嘉蒂之眼.buffId, 来源);
    }
    constructor() {
        BuffUtil.registerBuffType(Item_斯嘉蒂之眼.buffType);
        EventManager.onTakeAttack(Item_斯嘉蒂之眼.spellEffect);
    }
    static spellEffect(d: DamageEventData) {
        if (!ItemUtil.isUnitHasItem(d.source, 'nflg')) return;
        Item_斯嘉蒂之眼.释放(0, 0, d.source, d.target, d);
    }
}
